package top.conangao.system.assemble;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.MappingConstants;
import org.mapstruct.Mappings;
import top.conangao.common.entity.BaseAssemble;
import top.conangao.system.domain.SysUser;
import top.conangao.system.domain.dto.SysUserDTO;
import top.conangao.system.domain.vo.SysUserVO;

import java.util.List;

/**
 * @author ConanGao
 * @description UserAssemble
 * @since 2023/11/20 10:57
 **/
@Mapper(componentModel = MappingConstants.ComponentModel.SPRING,uses = {SysRoleAssemble.class,
        SysMenuAssemble.class})
public interface SysUserAssemble extends BaseAssemble<SysUserVO, SysUserDTO, SysUser> {
    @Override
    @Mappings({
            @Mapping(source = "listSysRoleDTO",target = "listSysRoleVO"),
            @Mapping(source = "listSysMenuDTO",target = "listSysMenuVO")
    })
    SysUserVO dto2vo(SysUserDTO listDTO);
}
